package com.cbh.feign.controller.product;


import java.util.List;

import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.cbh.api.model.ApiResult;
import com.cbh.api.model.product.ProcurementAgreement;


public interface ProcurementControllerBase {


	@RequestMapping(value = "/auth/v3/procurement/agreement", method = RequestMethod.POST, produces = "application/json")
	public ApiResult<String> save( @RequestParam(value = "accountToken", required = true) String accountToken,
			 @RequestBody(required = true) ProcurementAgreement ob) ;

	/**
	 * 根据ID获取供应商
	 * 
	 * @param id
	 * @return
	 */
	@RequestMapping(value = "/auth/v3/procurement/agreement/id", method = RequestMethod.GET, produces = "application/json")
	public ApiResult<ProcurementAgreement> purchase(
			@RequestParam(value = "accountToken", required = true) String accountToken,
			@RequestParam(value = "id", required = true) String id) ;

	@RequestMapping(value = "/auth/v3/procurement/agreement/supplier", method = RequestMethod.GET, produces = "application/json")
	public ApiResult<List<ProcurementAgreement>> supplier(
			@RequestParam(value = "accountToken", required = true) String accountToken,
			@RequestParam(value = "id", required = true) String id) ;

}
